A sprite's matrix property ( kSpritePropertyMatrix ) describes the sprite's location and scaling within its sprite world or sprite track. By modifying a sprite's matrix, you can modify the sprite's location so that it appears to move in a smooth path on the screen or so that it jumps from one place to another. You can modify a sprite's size, so that it shrinks, grows, or stretches. Depending on which image compressor is used to create the sprite images, other transformations, such as rotation, may be supported as well. Translation-only matrices provide the best performance.
A sprite's layer property ( kSpritePropertyLayer ) is a numeric value that specifies a sprite's layer in the animation. Sprites with lower layer numbers appear in front of sprites with higher layer numbers. To designate a sprite as a background sprite, you should assign it the special layer number kBackgroundSpriteLayerNum .
A sprite's visible property ( kSpritePropertyVisible ) specifies whether or not the sprite is visible. To make a sprite visible, you set the sprite's visible property to TRUE .
A sprite's graphics mode property ( kSpritePropertyGraphicsMode ) specifies a graphics mode and blend color that indicates how to blend a sprite with any sprites behind it and with the background. To set a sprite's graphics mode, you call SetSpriteProperty , passing a pointer to a ModifierTrackGraphicsModeRecord structure.
| Previous | Chapter Contents | Chapter Top | Next |